[Unit]
Description=Grafana 9.0.0
Requires=network-online.target
# NOTE: that After/Wants=time-sync.target is not enough, you need to ensure
# that the time was adjusted already, if you use systemd-timesyncd you are
# safe, but if you use ntp or some other daemon, you should configure it
# additionaly.
After=time-sync.target network-online.target
Wants=time-sync.target

[Service]
Type=simple
User={{ owner }}
Group={{ group }}
Restart=always
RestartSec=30
ExecStart={{ grafana_install_path }}/grafana/bin/grafana-server --config={{ grafana_install_path }}/grafana/conf/defaults.ini --homepath={{ grafana_install_path }}/grafana
# Minus means that this file is optional.
LimitCORE=infinity
LimitNOFILE=500000
CapabilityBoundingSet=CAP_NET_ADMIN CAP_IPC_LOCK CAP_SYS_NICE

[Install]
WantedBy=multi-user.target
